
#include "myMenuIconStyle.h"

MyMenuIconStyle::MyMenuIconStyle()
    : QProxyStyle()
{
}

MyMenuIconStyle::~MyMenuIconStyle()
{
}

void MyMenuIconStyle::SetCustomSize(int size)
{
    _iconSize = size;
}

int MyMenuIconStyle::pixelMetric(PixelMetric metric, const QStyleOption* option, const QWidget* widget) const
{
    int s = QCommonStyle::pixelMetric(metric, option, widget);
    if (metric == QStyle::PM_SmallIconSize) {
        s = _iconSize;
    }
    return s;
}
